package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HmzDoorMapper;
import com.ruoyi.system.domain.HmzDoor;
import com.ruoyi.system.service.IHmzDoorService;

/**
 * 通道门设置Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-17
 */
@Service
public class HmzDoorServiceImpl implements IHmzDoorService 
{
    @Autowired
    private HmzDoorMapper hmzDoorMapper;

    /**
     * 查询通道门设置
     * 
     * @param id 通道门设置主键
     * @return 通道门设置
     */
    @Override
    public HmzDoor selectHmzDoorById(Long id)
    {
        return hmzDoorMapper.selectHmzDoorById(id);
    }

    /**
     * 查询通道门设置列表
     * 
     * @param hmzDoor 通道门设置
     * @return 通道门设置
     */
    @Override
    public List<HmzDoor> selectHmzDoorList(HmzDoor hmzDoor)
    {
        return hmzDoorMapper.selectHmzDoorList(hmzDoor);
    }

    /**
     * 新增通道门设置
     * 
     * @param hmzDoor 通道门设置
     * @return 结果
     */
    @Override
    public int insertHmzDoor(HmzDoor hmzDoor)
    {
        hmzDoor.setCreateTime(DateUtils.getNowDate());
        return hmzDoorMapper.insertHmzDoor(hmzDoor);
    }

    /**
     * 修改通道门设置
     * 
     * @param hmzDoor 通道门设置
     * @return 结果
     */
    @Override
    public int updateHmzDoor(HmzDoor hmzDoor)
    {
        hmzDoor.setUpdateTime(DateUtils.getNowDate());
        return hmzDoorMapper.updateHmzDoor(hmzDoor);
    }

    /**
     * 批量删除通道门设置
     * 
     * @param ids 需要删除的通道门设置主键
     * @return 结果
     */
    @Override
    public int deleteHmzDoorByIds(Long[] ids)
    {
        return hmzDoorMapper.deleteHmzDoorByIds(ids);
    }

    /**
     * 删除通道门设置信息
     * 
     * @param id 通道门设置主键
     * @return 结果
     */
    @Override
    public int deleteHmzDoorById(Long id)
    {
        return hmzDoorMapper.deleteHmzDoorById(id);
    }
}
